package com.example.homework

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.FrameLayout
import android.widget.LinearLayout
import com.example.homework.databinding.PostViewBinding

class PostView
@JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet? = null,
    defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {
    val binding = PostViewBinding.inflate(LayoutInflater.from(context))

    init {
        addView(binding.root)
    }

    fun setUpperText(text: String) {
        binding.upperTextView.text = text
    }

    fun setLowerText(text: String) {
        binding.lowerTextView.text = text
    }
}